﻿using System.Windows.Data;

namespace WasaWasa.Converters
{
    [ValueConversion(typeof(bool), typeof(string))]
    public class NegativeConverter : IValueConverter
    {
        #region IValueConverter メンバ

        public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return !((bool) value);
        }

        public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return !((bool)value);
        }

        #endregion
    }
}
